<template>
	<view class="audit-status">
		<NavBar :title="navTitle" />
		<view class="content">
			<image :src="'/static/icon/components/'+ imgType +'.png'" class="c-img"/>
			<view class="title"> {{ title }} </view>
			<view class="tips" v-if="tips"> {{ tips }} </view>
			<view class="reject" v-if="errText"> 驳回理由：{{ errText }} </view>
			<view class="btn-box">
				<view class="btn cancel" v-if="cancel" @tap="goHome"> {{ cancel }} </view>
				<view class="btn submit" v-if="confirm" @tap="emit('confirm')"> {{ confirm }} </view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import NavBar from '@/components/NavBar.vue';
	const props = defineProps(['imgType', 'title', 'tips', 'errText', 'cancel', 'confirm', 'navTitle'])
	const emit = defineEmits(['confirm'])
	const goHome = () => uni.switchTab({ url: '/pages/index/index' })
	// const imgType = ref('padding') //success error padding
</script>

<style lang="scss" scoped>
	.audit-status {
		.content {
			text-align: center;
			display: flex;
			flex-direction: column;
			align-items: center;
			.c-img {
				margin-top: 80px;
				width: 110px;
				height: 102px;
			}
			.title {
				max-width: 308px;
				color: #333333;
				font-size: 16px;
				font-weight: 500;
				margin: 20px 0;
				line-height: 20px;
			}
			.tips {
				max-width: 308px;
				font-weight: 400;
				font-size: 14px;
				color: #666666;
				line-height: 20px;
			}
			.reject {
				max-width: 308px;
				text-align: left;
				margin-top: 10px;
				color: #FF3B1E;
				font-size: 14px;
				font-weight: 400;
				line-height: 16px;
			}
			.btn-box {
				margin-top: 40px;
				display: flex;
				justify-content: center;
				align-items: center;
				.btn {
					height: 40px;
					color: #FF3B1E;
					font-size: 16px;
					padding: 0 20px;
					font-weight: 400;
					line-height: 40px;
					border-radius: 99px;
					border: 1px solid #FF3B1E;
					box-sizing: border-box;
				}
				.cancel {
					margin-right: 20px;
				}
				.submit {
					color: #FFFFFF;
					background: #FF3B1E;
					border: 0;
				}
			}
		}
	}
</style>
